<template>
  <view class="container">
    <!-- Login Section with Click Event -->
    <view class="login-section" @click="goToLogin">
      <view class="login-content">
        <image @click="goToLogin" src="/static/img/login.png"  class="login-icon"></image>
        <view class="login-text">
          点击登录
          <view class="welcome-text">欢迎来到袁隆平杂交水稻科学园</view>
        </view>
      </view>
    </view>

    <!-- Appointment Record Section -->
    <view class="appointment-section">
      <view class="appointment-title">预约记录</view>
      <view class="no-record">
        <image src="/static/img/zanwu.png" class="no-record-icon"></image>
        <view class="no-record-text">暂无预约记录</view>
      </view>
    </view>

  </view>
</template>

<script >
export default {
  methods: {
    goToLogin() {
         uni.navigateTo({
           url: '/pages/login/login' // 确保路径正确
         });
       }
  }
}
</script>

<style>
.container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
}

.header-title {
  font-size: 18px;
  font-weight: bold;
}

.header-icons {
  display: flex;
}

.login-section {
  display: flex;
  align-items: center;
  padding: 20px;
  background-color: #f0f0f0;
}

.login-icon {
  width: 50px;
  height: 50px;
  margin-right: 10px;
}

.login-text {
  font-size: 16px;
}

.welcome-text {
  color: #888;
  font-size: 12px;
}

.appointment-section {
  flex: 1;
  padding: 20px;
}

.appointment-title {
  font-size: 18px;
  font-weight: bold;
}

.no-record {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

.no-record-icon {
  width: 80px;
  height: 80px;
}

.no-record-text {
  font-size: 14px;
  color: #888;
  margin-top: 10px;
}

</style>
